package com.kingsoft.dc.khaos.module.spark.request.encode;

import java.util.HashMap;
import java.util.Map;

/**
 * create by yansu on 2019/07/02
 */
public class EncoderFactory {
    public Map<String, EncoderUtil> encoderUtilMap = new HashMap<>();

    public EncoderFactory() {
        encoderUtilMap.put("md5", new Md5Util());
    }

    public EncoderUtil getEncoderUtil(String type){
        return encoderUtilMap.get(type);
    }

    public EncoderUtil getEncoderUtil() {
        return encoderUtilMap.get("md5");
    }
}
